From: Eli Zaretskii Date: Sat, 3 Dec 2011 09:55:27 +0000 (+0200) Subject: Fix bug #10192 with assertion violation when scrolling. X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1~1^2~324^2~1457 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=4876507d7f8038fa867654d72a61edaed3826d0e;p=emacs.git Fix bug #10192 with assertion violation when scrolling. src/xdisp.c (redisplay_window): Don't let `margin' become negative. This could happen when scroll-margin is zero and scroll-*-aggressively is a small float number. --- diff --git a/src/ChangeLog b/src/ChangeLog index 433cf14209a..17f03ab5f4e 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -3,6 +3,7 @@ * xdisp.c (handle_invisible_prop): If the invisible text ends just before a newline, prepare the bidi iterator for consuming the newline, and keep the current paragraph direction. (Bug#10183) + (redisplay_window): Don't let `margin' become negative. (Bug#10192) 2011-12-02 Juri Linkov diff --git a/src/xdisp.c b/src/xdisp.c index b9741d97d30..7708b9c40fa 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -15617,7 +15617,7 @@ redisplay_window (Lisp_Object window, int just_this_one_p) pt_offset = float_amount * WINDOW_BOX_TEXT_HEIGHT (w); if (pt_offset == 0 && float_amount > 0) pt_offset = 1; - if (pt_offset) + if (pt_offset && margin > 0) margin -= 1; } /* Compute how much to move the window start backward from